import request from '@/utils/baseapi'
import store from '@/store'

export const loginAPI = (data) => {
  return request(
    {
      url: '/v1_0/authorizations',
      method: 'post',
      data

    }
  )
}

// 获取用户信息的接口
export const userInfoAPI = (data) => {
  return request({
    url: '/v1_0/user/profile',
    method: 'get'
  })
}
export const avatarAPI = (data) => {
  return request({
    url: '/v1_0/user/photo',
    method: 'patch',
    data
  })
}
export const editUserInfoAPI = (data) => {
  return request({
    url: '/v1_0/user/profile',
    method: 'patch',
    data
  })
}
